<div class="order-list-page" ng-if="pagedata.op == 'main'">
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">多商户订单管理</div>
		<div class="fui-header-right"></div>
	</div>
	<div style="margin-top:58px"></div>
	<div id="tab" class="fui-tab fui-tab-danger">
        <a ng-class="{'external active':pagedata.params.status == 'all'}" href="javascript:" ng-click="pagedata.params.status = 'all';tool.get_list('jy_jd/manage.order_list/list/',true)">全部</a>
        <a ng-class="{'external active':pagedata.params.status == 0}" href="javascript:" ng-click="pagedata.params.status = 0;tool.get_list('jy_jd/manage.order_list/list/',true)">待处理</a>
        <a ng-class="{'external active':pagedata.params.status == 1}" href="javascript:" ng-click="pagedata.params.status = 1;tool.get_list('jy_jd/manage.order_list/list/',true)">预定成功</a>
        
        <a ng-class="{'external active':pagedata.params.status == 6}" href="javascript:" ng-click="pagedata.params.status = 6;tool.get_list('jy_jd/manage.order_list/list/',true)">已入住</a>
        <a ng-class="{'external active':pagedata.params.status == 5}" href="javascript:" ng-click="pagedata.params.status = 5;tool.get_list('jy_jd/manage.order_list/list/',true)">已完成</a>
		<a ng-class="{'external active':pagedata.params.status == 2}" href="javascript:" ng-click="pagedata.params.status = 2;tool.get_list('jy_jd/manage.order_list/list/',true)">退款中</a>
	</div>
	<div class='fui-content order-list' style="margin-top:4.5rem">
	<div class="fui-list-group order-item" ng-repeat="item in pagedata.list">
                <a class="fui-list external" style="padding: 0.42rem 0.5rem" href="javascript:" ng-click="access_json('jy_jd/manage.order_detail//id='+item.id)">
                    <div class="fui-list-inner">
                        <div class="subtitle"> 订单号: {{item.order}}</div>
                    </div>
                    <div class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">{{item.statustitle}}</div>
                    <div class="angle"></div>
                </a> 
                    <a href="javascript:" ng-click="access_json('jy_jd/manage.order_detail//id='+item.id)">
                        <div class="fui-list-group-title lineblock">
                            <i class="icon jinyunicon icon-dianpu"></i> {{item.hotel.title}}
                            <span class="status noremark" style="color:#f60;">{{item.hotel.address}}</span>
                        </div>
                    </a>
                    <a href="javascript:" ng-click="access_json('jy_jd/manage.order_detail//id='+item.id)" class="external" data-nocache="true">
                        <div class="fui-list goods-list">
                            <div class="fui-list-media" style="">
                                <img class="" ng-src="{{tomedia(item.hotel.image) || '../core/resource/images/nopic.jpg'}}">
                            </div>
                            <div class="fui-list-inner">
                                <div class="text goodstitle towline">{{item.room.title}}</div>
								<div class="subtitle">{{item.num}}间</div>
                            </div>
							
                            <div class="fui-list-angle">
							<div style="color:#999;"> 入住人：{{item.name}}</div>
							<div style="color:#999;"> 入住时间：{{item.intime}} ({{item.day}}晚)</div>
							<div ng-if="item.room.is_opentui==1" style="color:#999;"> 入驻前{{item.room.tui_day}}天，{{item.room.tui_time}}点前可退订！</div>
                                金额：￥<span class="marketprice">{{price(item.fee)}}</span>
							</div>
                        </div>
                    </a>
                <div class="fui-list-group-title lineblock">
					<span style="color:#999;"><i class="icon icon-shijian" style="color:#f60;"></i> {{item.createtime}}</span>
                    <span class="status noremark">共 <span>1</span> 个订单 实付: <span class="text-danger">￥{{price(item.fee)}}</span></span>
                </div>
            <div class="fui-list-group-title lineblock opblock">
				<span class="status noremark">
					<div ng-show="item.ispay == 1 && item.status == 0" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'/manage.order_list/queren/','id='+item.id,'','确定要确认预定？')">确认预定</div>
					<div ng-show="item.ispay == 1 && (item.status == 0 || item.status==1)" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'/manage.order_list/receive/','id='+item.id,'','确定要帮客户取消预定？')">取消预定</div>
					<div ng-show="item.status == 2" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'/manage.order_list/quxiao/','id='+item.id,'','确定要同意取消预定？')">同意取消预定</div>
					<div ng-show="item.status == 3" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="access_json('/manage.order_list/pay/','id='+item.id)">确认退款</div>
					<div ng-show="item.status == 1" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'/manage.order_list/ruzhu/','id='+item.id,'','确定要确认入住？')">确认入住</div>
					<div ng-show="item.status == 1" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'/manage.order_list/tuifang/','id='+item.id)">客户退房</div>
				</span>
            </div>
        </div>
	</div>
	<div class="content-empty" ng-if="pagedata.order == 0">
		  <i class="icon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有订单！</p>
	</div>
</div>
<script>
scope.tool.get_list('jy_jd/manage.order_list/list/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_jd/manage.order_list/list/');
}
</script>